package com.punch.common.dto.course;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * ClassDTO-班级信息 表单
 *
 * @author xiaol
 * @version 1.0.0
 * @since 2020/7/21
 */
@Data
public class ClassSaveOrUpdateDTO implements Serializable {

    /**
     * 班级名称
     */
    @ApiModelProperty(name = "className", notes = "班级名称")
    @NotBlank(message = "班级名称不能为空")
    private String className;

    /**
     * 对应的课程id
     */
    @ApiModelProperty(name = "courseId", notes = "对应的课程id")
    @NotNull(message = "课程不能为空")
    private Long courseId;


    /**
     * 课程适用年级名称  1-6年级多选
     */
    @ApiModelProperty(name = "courseGrade", notes = "课程适用年级名称  1-6年级多选")
    @NotNull(message = "适用年级不能为空")
    private List<Integer> courseGrade;

    /**
     * 上课周期 星期几，多选
     */
    @ApiModelProperty(name = "courseWeek", notes = "上课周期 星期几，多选,多个,分割")
    @NotNull(message = "上课周期不能为空")
    private List<Integer> courseWeek;

    /**
     * 课时数
     */
    @ApiModelProperty(name = "courseHourCount", notes = "课时数")
    @NotNull(message = "课时数")
    private Integer courseHourCount;


    /**
     * 单价
     */
    @ApiModelProperty(name = "courseHourPriceShow", notes = "单价")
    @NotNull(message = "课时数")
    private BigDecimal courseHourPriceShow;

    /**
     * 是否包含教材/教具：勾选框，默认否  0否  1是
     */
    @ApiModelProperty(name = "goodsFlag", notes = "是否包含教材/教具：勾选框，默认否  0否  1是")
    private Integer goodsFlag;

    /**
     * 商品id
     */
    @ApiModelProperty(name = "goodsId", notes = "商品id")
    @JsonSerialize(using = ToStringSerializer.class)
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long goodsId;
    /**
     * 是否必须购买：勾选框，默认否    0否  1是
     */
    @ApiModelProperty(name = "buyFlag", notes = "是否必须购买：勾选框，默认否    0否  1是")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Integer buyFlag;

    /**
     * 上课老师id
     */
    @ApiModelProperty(name = "teacherId", notes = "上课老师id")
    private Long teacherId;

    /**
     * 上课老师id
     */
    @ApiModelProperty(name = "teacherName", notes = "上课老师")
    private String teacherName;


}
